unit KnjigaPrejetihRacunovFrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DokumentVnosFrm, cxStyles, cxCustomData, cxGraphics, cxFilter,
  cxData, cxEdit, DB, cxDBData, cxGridBandedTableView, DBClient, MConnect,
  alBaseDataSet, cxEditRepositoryItems, cxContainer, StdActns, ActnList,
  cxGridLevel, cxGridCustomTableView, cxGridTableView,
  cxGridDBBandedTableView, cxClasses, cxControls, cxGridCustomView, cxGrid,
  cxDBEdit, cxDropDownEdit, cxCalendar, cxTextEdit, cxMaskEdit, StdCtrls,
  ExtCtrls, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox,
  cxCurrencyEdit, cxDBEditRepository, ImgList, PoslovanjeSrv_TLB,
  cxDataStorage, cxExtEditRepositoryItems, cxCheckComboBox,
  cxDBCheckComboBox, alActions, kdbinfo, kdbstruc;

type
  TfrmKnjigaPrejetihRacunov = class(TfrmDokumentVnos)
    lblDatumPlacila: TLabel;
    edtDatumPlacila: TcxDBDateEdit;
    lblNacinPlacila: TLabel;
    edtNacinPlacila: TcxDBTextEdit;
    grpbxRacun: TGroupBox;
    lblStevilkaDokumenta: TLabel;
    lblDatumDokumenta: TLabel;
    lblPoslovniPartner: TLabel;
    lblVrednostZDDV: TLabel;
    edtStevilkaDokumenta: TcxDBMaskEdit;
    edtDatumDokumenta: TcxDBDateEdit;
    edtVrednostZDDV: TcxDBCurrencyEdit;
    lkpcbPoslovniPartner: TcxDBLookupComboBox;
    grpbxOdbija: TGroupBox;
    grpbxODBDomaciTrg: TGroupBox;
    grpbxODBTujiTrg: TGroupBox;
    grpbxODBPavsalnoNadomestilo: TGroupBox;
    lblODBPNOsnova: TLabel;
    edtODBPNOsnova: TcxDBCurrencyEdit;
    lblODBPNDDV: TLabel;
    edtODBPNDDV: TcxDBCurrencyEdit;
    grpbxNeOdbija: TGroupBox;
    lblODBDTZSOsnova: TLabel;
    edtODBDTZSOsnova: TcxDBCurrencyEdit;
    lblODBDTZSDDV: TLabel;
    edtODBDTZSDDV: TcxDBCurrencyEdit;
    lblODBDTOSOsnova: TLabel;
    edtODBDTOSOsnova: TcxDBCurrencyEdit;
    edtODBDTOSDDV: TcxDBCurrencyEdit;
    lblODBDTOSDDV: TLabel;
    lblODBTTZSOsnova: TLabel;
    edtODBTTZSOsnova: TcxDBCurrencyEdit;
    edtODBTTZSDDV: TcxDBCurrencyEdit;
    lblODBTTZSDDV: TLabel;
    lblODBTTOSOsnova: TLabel;
    edtODBTTOSOsnova: TcxDBCurrencyEdit;
    edtODBTTOSDDV: TcxDBCurrencyEdit;
    lblODBTTOSDDV: TLabel;
    lblNeODBOsnova: TLabel;
    edtNeODBOsnova: TcxDBCurrencyEdit;
    lblNeODBDDV: TLabel;
    edtNeODBDDV: TcxDBCurrencyEdit;
    scnPoslovniPartner: TSharedConnection;
    cdsPoslovniPartner: TBaseDataSet;
    dtsrcPoslovniPartner: TDataSource;
    rpstMainStevilkaDokumenta: TcxEditRepositoryMaskItem;
    rpstMainPoslovniPartnerNaziv: TcxEditRepositoryLookupComboBoxItem;
    rpstMainZnesek: TcxEditRepositoryCurrencyItem;
    rpstMainNacinPlacila: TcxEditRepositoryTextItem;
    lblDatumPrejema: TLabel;
    edtDatumPrejema: TcxDBDateEdit;
    grpbxOprosceneNabave: TGroupBox;
    lblOPNAVOsnova: TLabel;
    lblOPNABDDV: TLabel;
    edtOPNABOsnova: TcxDBCurrencyEdit;
    edtOPNABDDV: TcxDBCurrencyEdit;
    actnKnjigaPrejetihRacunov: TReportPrint;
  private
    { Private declarations }
  protected
    procedure Deinitialize; override;
    procedure DoDBRefresh; override;
    procedure Initialize; override;
  public
    { Public declarations }
  end;

var
  frmKnjigaPrejetihRacunov: TfrmKnjigaPrejetihRacunov;

implementation

uses
  MainFrm, KnjigaPrejetihRacunovRpt;

{$R *.dfm}

{ TfrmKnjigaPrejetihRacunov }

procedure TfrmKnjigaPrejetihRacunov.Deinitialize;
begin
  cdsPoslovniPartner.Close;
  inherited;
end;

procedure TfrmKnjigaPrejetihRacunov.DoDBRefresh;
begin
  inherited;
  cdsPoslovniPartner.Refresh;
end;

procedure TfrmKnjigaPrejetihRacunov.Initialize;
begin
  inherited;
  cdsPoslovniPartner.Open;
end;

end.
